﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace TextDataExtractor.DEML {
	public interface IDemlElement: ICloneable {
		
		IDictionary<string, string> Arguments {
			get;
		}

		string Name {
			get;
			set;
		}

		string FullName { get; }

		void loadFromXml(XmlNode node, DemlRegistry registry);
	}

	public static class IDEMLElementExtensions {
		public static T safeClone<T>(this IDemlElement target) where T: IDemlElement {
			return target != null ? (T)target.Clone() : default(T);
		}
	}
}
